<?php
/**
 * @Author: Marte
 * @Date:   2017-08-21 16:36:50
 * @Last Modified by:   Marte
 * @Last Modified time: 2017-08-21 16:41:07
 */

header('Content-Type:text/html;charset=utf-8');
require '../data/config_connect.php';
if(!isset($_POST["submit"])){
      exit('非法访问!');
  }
$_nick=$_POST['search'];
$_sql='select * from author where penname="'.$_nick.'"';
$_result=$_mysql->query($_sql);

if($_assoc=$_result->fetch_assoc())
{
    echo "<script>location='admin_index.php?type=5&id=".$_assoc['id']."&searchresult1=1';</script>";
}
else{
    echo "<script>alert('未找到该用户');window.history.back();</script>";
}
?>

